package com.llxz.blog.acl.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.llxz.blog.acl.entity.Permission;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author xzs
 * @description: date: 2021/9/4 9:22
 */
public interface PermissionService extends IService<Permission> {

    //获取全部菜单
    List<Permission> queryAllMenu();

    //递归删除
    void removeChildById(String id);

    //角色分配权限
    void saveRolePermission(String roleId, String[] permissionId);

    //根据角色获取菜单
    List<Permission> selectAllMenu(String roleId);

    //通过用户id获取权限列表
    List<String> selectPermissionValueByUserId(String id);

    List<JSONObject> selectPermissionByUserId(String id);
}

